import http from '../../util/request.js';
var config = require("../../../config.js");
var WxParse = require('../../../wxParse/wxParse.js');
Page({
  data:{
    product:[],
    num: 1,
    totalNum: 0,
    hasCarts: false,
    curIndex: 0,
    show: false,
    scaleCart: false
  },
  onLoad:function(options){
    console.log(options);
    http.get('Productinfo', { product_id: options.product_id}).then(data => {
      this.setData({ product: data });
      WxParse.wxParse('content', 'html', this.data.product.product_content, this, 3);
    });
	 //this.setData({goods:config.products[options.id-1]}); 
  },
   teltoUs:function(){
	   wx.makePhoneCall({
			phoneNumber: config.telphone //仅为示例，并非真实的电话号码
		})
   }	
})